package controller;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JOptionPane;

import model.GameClient;

public class ExitListener implements ActionListener
{

	@SuppressWarnings("unused")
	private GameClient gameClient;

	public ExitListener(GameClient gameClient)
	{
		super();
		this.gameClient = gameClient;
	}

	public void actionPerformed(ActionEvent e)
	{
		int response = JOptionPane.showConfirmDialog(null,
				"Do you want to exit the game?", "Exit Program??",
				JOptionPane.YES_NO_OPTION);
		if (response == JOptionPane.YES_OPTION)
			System.exit(0);
	}
}
